Garbage collection techniques for use in computing environments are well known. In mark-and-sweep garbage collection, an object connectivity graph is traced from root objects to all their referents and their descendents (i.e., all objects “reachable” from root objects) in an object population, with all traced objects assumed to be in use and marked as such. Unmarked objects are assumed to be not in use and are made available for reallocation. In concurrent mark-and-sweep garbage collection, object tracing and marking is performed in parallel with the operation of an executing program or process, referred to as a mutator. Since the object connectivity graph may be modified by the mutator while the collector traverses from object to object, a write barrier is generally employed by the mutator to record locations of object references that it modifies. Typically, objects are grouped into cards which the mutator marks if it modifies an object reference on a card. Objects on marked cards are then retraced by the collector during a process referred to as card cleaning in order to ensure that all reachable objects are marked.
While object tracing and card cleaning may be executed in parallel with the operation of the mutator, a card may be marked at any time, including while it is being cleaned or immediately thereafter. Therefore, to ensure correctness, all computing processes are periodically suspended with the exception of the garbage collector which then cleans all marked cards and traces the object connectivity graph from unmarked root objects, ensuring that all reachable objects are marked. However, the “stop-the-world” suspension of all processing is often disruptive to processing flow and should therefore be performed as infrequently and quickly as possible. Furthermore, the concurrent operation of the garbage collector may slow down the application threads due to the amount of system resources it needs. Thus, an improved concurrent garbage collection technique that minimizes the frequency and duration of “stop-the-world” garbage collection while requiring less system resources would be advantageous.